﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ColinHan.BlamBlam.Client.Entities;

namespace ColinHan.BlamBlam.Client.Models
{
    class Projects
    {
        public Projects()
        {
            this.AllProjects = new List<Project>()
                                   {
                                       new Project() {
                                           Subject = "Default",
                                           Tasks = {
                                               new Task() {Subject = "Test"}
                                           }
                                       },
                                       new Project()
                                           {
                                               Subject = "Spreadsheet",
                                               Tasks =
                                                   {
                                                       new Task()
                                                           {
                                                               Subject = "Test"
                                                           }
                                                   }
                                           },
                                       new Project() {Subject = "Multirow"},
                                       new Project() {Subject = "Others"}
                                   };
        }

        public List<Project> AllProjects { get; private set; }
        public Project DefaultProject
        {
            get
            {
                return this.AllProjects.FirstOrDefault(p => p.Subject == "Default");
            }
        }
    }
}
